package com.freight.user.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.ColumnTransformer;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class CarrierDriverLicenseVo {

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "驾驶证号")
    @ColumnTransformer(read = "AES_DECRYPT(UNHEX(num),'freight')", write = "HEX(AES_ENCRYPT(?, 'freight'))")
    private String num;

    @ApiModelProperty(value = "驾驶证准驾车型")
    private String driverType;

    @ApiModelProperty(value = "发证机关")
    private String issuingOrganizations;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "驾驶证有效期开始时间")
    private Date startDate;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "驾驶证有效期时长")
    private Date endDate;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "初次领证日期")
    private Date issueDate;
    @ApiModelProperty(value = "地址")
    private String addr;
    @ApiModelProperty(value = "性别")
    private String sex;
    @ApiModelProperty(value = "档案编号")
    private String archiveNo;
    @ApiModelProperty(value = "驾照证正面地址")
    private Long driverFontPicFileID;
    @ApiModelProperty(value = "驾照证反面地址")
    private Long driverBackPicFileID;

}
